﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp_core
{
    public class ActionFunc
    {
        public void Show()
        {
            string a = "bruke";
            Action<string> action = new Action<string>(test);
            action.Invoke(a);


            Func<int, int, string> func = new Func<int, int, string>(test);
            Console.WriteLine(func.Invoke(1, 2));


        }

        public void test(string name)
        {
            Console.WriteLine($"你好{name}");
        }

        public string test(int i, int j)
        {
            return $"{i}+{j}={i + j}";
        }



    }
}
